package aaa;

import java.awt.event.ActionListener;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import java.awt.event.ActionEvent;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.JTextArea;

public class J26_SungJukAboutDialog extends JDialog{

	 public J26_SungJukAboutDialog(JFrame p) {
		 super(p);
		 setSize(450,450);
		setModalityType(ModalityType.DOCUMENT_MODAL);
	 	setTitle("프로그램 정보");
	 	setBounds(200,200,480,300);
	 	
	 	JPanel westp = new JPanel();
	 	getContentPane().add(westp, BorderLayout.WEST);
	 	westp.setLayout(new BoxLayout(westp, BoxLayout.X_AXIS));
	 	
	 	JLabel imgglbl = new JLabel("");
	 	imgglbl.setIcon(new ImageIcon("C:\\Users\\501-pc13\\Desktop\\images.png"));
	 	westp.add(imgglbl);
	 	
	 	JPanel southp = new JPanel();
	 	getContentPane().add(southp, BorderLayout.SOUTH);
	 	
	 	JButton okbtn = new JButton("확인");
	 	okbtn.addActionListener(new ActionListener() {
	 		public void actionPerformed(ActionEvent e) {
	 			//System.exit(0);
	 			setVisible(false);
	 			dispose();	// 메모리에 생성된 AboutDialog 객체를 제거
	 			
	 		}
	 	});
	 	southp.add(okbtn);
	 	
	 	JPanel eastp = new JPanel();
	 	getContentPane().add(eastp, BorderLayout.CENTER);
	 	eastp.setLayout(new BoxLayout(eastp, BoxLayout.Y_AXIS));
	 	
	 	JTextArea textArea = new JTextArea();
	 	textArea.setLineWrap(true);
	 	textArea.setText("무덤을 발견했다.\r\n\r\n선택지 1 : 무덤을 열어본다.\r\n\r\n1-1 : 무엇인가 나온다\r\n1-2 : 텅 비어서 자신이 들어간다\r\n1-3 : 무덤이 아니었다\r\n\r\n선택지 2 : 무덤을 다시 묻는다\r\n\r\n2-1 : 묻을지 고민하다 늙어서 죽는다\r\n2-2 : 다시 묻고 아무일 없단 듯이 간다");
	 	eastp.add(textArea);
	 	setVisible(true);
		
	}

}
